#ifndef BPL_SYSTEM
#define BPL_SYSTEM

#include "Entity.h"
#include "EntityManager.h"
#include "State.h"
#include <set>
#include <SFML/Graphics.hpp>
#include <boost/shared_ptr.hpp>

namespace BPL
{

class System
{
public:
    System() {}
    virtual ~System() {}

    virtual void update(float dt) = 0;

    virtual void addEntity(int ent);
    virtual void deleteEntity(int ent);
    void clearEntities();
    bool hasEntity(int ent) const;

    static EntityManager* entityManager;
	virtual void attachApp(sf::RenderWindow* app);
	void setParent(State* parent);

protected:
    sf::RenderWindow* mpt_app;
	State* mpt_parent;
    std::set<int> mpt_entitiesID;
};
//typedef boost::shared_ptr<System> SystemPtr;

}

#endif

